﻿@model IEnumerable<SerieSpotter.Models.Episode>
<table cellpadding="10">
    <tr>
        <th>
            @Resources.Resource.Titel
        </th>
        <th>
            @Resources.Resource.Beschrijving
        </th>
        <th>
            @Resources.Resource.Datum
        </th>
        <th>
            @Resources.Resource.Zender
        </th>
        <th>
            @Resources.Resource.Beoordeling
        </th>
        <th></th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Title)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Description)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Date)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Network)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Rating)
            </td>
            <td>
                @Html.ActionLink("Comments", "Index", "Comments", new { id = item.Id }, null)
            </td>
            @if (User.IsInRole("admin")) // enkel zitchbaar voor admin
            {
                <td>
                    @Html.ActionLink(@Resources.Resource.Edit, "Edit", new { id = item.Id })
                </td>
            }
        </tr>
    }

</table>
